<?php
include 'lib/controllerWithoutGetOrPost.php';
include 'lib/LoggedIn.php';
$loggedIn = new LoggedIn();
$loggedIn->setPermission = "Admin Area";
if(!$loggedIn->check()) {
    echo $loggedIn->message();
} else {

$dir = '/home/amemoryt/public_html/pdf/processed/'; 
//open a handle to the directory
$handle = opendir($dir);
//intitialize our counter
$count = 0;
//loop through the directory
while (false !== ($file = readdir($handle))) {
//evaluate each entry, removing the . & .. entries
if (is_file($file) && $file !== '.' && $file !== '..') {
$count++;
} else {
	echo $file."<br />";
	if(file_exists("/home/amemoryt/public_html/pdf/processed/".$file)) {
		//echo "yes <br />";
	}
	$count++;
}
}
echo $count;

}
?>
